package com.grm.workflow.listener;

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.TaskListener;
import org.flowable.task.service.delegate.DelegateTask;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.Map;

@Component
@Slf4j
public class HolidayTaskListener implements TaskListener {
    @Override
    public void notify(DelegateTask delegateTask) {
        log.info("执行任务监听器:{}",new Date());
        Map<String, Object> variables = delegateTask.getVariables();
        variables.forEach((k,v)->{
            log.info("执行任务监听器:{},{}",k,v);
        });
    }

}